1. Field of the Invention
The present invention relates to an image processing scheme used in an image data processing apparatus, an image data processing method, a software program for performing the method, and a recording medium storing the software program therein, and, in particular, to device drivers such as an application program and a printer driver, and so forth for decoding image information, in particular, color image information.
2. Description of the Related Art
Recently, in a case of transmission or storage of a color image, in order to reduce an amount of data, it is common to compress an original image data. In case the compression is performed, orthogonal transform is performed on components of the image, and, thus, the amount of information is biased in a predetermined manner, and, then, quantization is performed on thus-obtained coefficients, so that the information amount is reduced. Further, in order to perform extreme quantization, all specific coefficients may be eliminated (regarded as zero), in some case.
Japanese patent publication No. 7-63177 discloses such an art. In which color image data is transformed into a brightness signal and a color-difference signal for every block unit, orthogonal transform is performed thereon so that coefficients expressing low-frequency direct-current components and high-frequency alternate-current components are obtained. Then, after that, quantization is performed thereon. On the other hand, as for the color-difference signal, orthogonal transform is not performed, and, only a representative color on each block is quantized and coded.
When the thus-compressed image is decompressed, inverse-quantization is performed, and, therethrough, quantization error may occur between the original image and the decompressed image. When such quantization error is large, the value on each pixel after decompression may exceed a predetermined range.
For example, as to a general full-color image, for each color component of RGB, each pixel is expressed by 8 bits, i.e., may have a value in a range between 0 and 255. However, due to the above-mentioned quantization error, the value of pixel may become negative, or exceeds 255. Such a situation will be referred to as range-over, hereinafter.
When such range-over occurs, a clipping processing is performed, in which a negative value is replaced by 0 and the value exceeding 255 is replaced by 255, conventionally. However, in case extreme quantization has been made, an amount of range-over (amount by which the value deviates from the predetermined range) may become large. Accordingly, the color tone/hue may change locally, only through simple clipping processing, and thereby, the image quality may be remarkably degraded.
The above-mentioned problem is also pointed out by U.S. Pat. No. 5,757,975, ‘Artifact reduction for large dynamic range input data in JPEG compression’. According to this patent, local average values are maintained, and local change in color tone is reduced as a result of peripheral pixels of the range-over pixel each having a value within a predetermined range being searched for, and the range-over amount being distributed to/borne by these peripheral pixels.
Such a scheme of ‘maintaining local average’ is effective in term of reducing image degradation. However, in order to search for peripheral pixels each having a value within a predetermined range may require a considerable amount of calculation. In fact, for this purpose, it is necessary to read the pixel values on many peripheral pixels, one by one, only for dealing with a single range-over pixel.